Created
June 21, 2022 09:41
-
-
Save lognseth/6083c40120052f2d2a96092bd64715b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Datasources | |
data "azurerm_virtual_network" "vnet" { | |
name = var.vnet_name | |
resource_group_name = var.vnet_resource_group_name | |
} | |
data "azurerm_subnet" "host_dbw_snt" { | |
name = "host_dbw_snt" | |
virtual_network_name = var.vnet_name | |
resource_group_name = var.vnet_resource_group_name | |
} | |
data "azurerm_subnet" "container_dbw_snt" { | |
name = "container_dbw_snt" | |
virtual_network_name = var.vnet_name | |
resource_group_name = var.vnet_resource_group_name | |
} | |
resource "azurerm_resource_group" "resource_group" { | |
name = local.resource_group_name | |
location = local.location | |
} | |
# Data Bricks | |
resource "azurerm_databricks_workspace" "databricks_workspace" { | |
name = local.dbworkspace_name | |
resource_group_name = azurerm_resource_group.resource_group.name | |
location = azurerm_resource_group.resource_group.location | |
sku = "premium" | |
custom_parameters { | |
no_public_ip = true | |
public_subnet_name = data.azurerm_subnet.host_dbw_snt.name | |
private_subnet_name = data.azurerm_subnet.container_dbw_snt.name | |
public_subnet_network_security_group_association_id = data.azurerm_subnet.host_dbw_snt.id | |
private_subnet_network_security_group_association_id = data.azurerm_subnet.container_dbw_snt.id | |
virtual_network_id = data.azurerm_virtual_network.vnet.id | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment